Add AI-powered plain-language to Azure Terraform translator#4
Open
tasa23 wants to merge 8 commits into
Open
Conversation
A small app that converts plain-English infrastructure descriptions into Terraform (HCL) for Azure using the azurerm provider, powered by Claude. - translator.py: core logic (streaming + adaptive thinking) - app.py: Flask web UI with /api/translate endpoint - cli.py: command-line interface (args or stdin) - templates/index.html: single-page UI with examples and copy-to-clipboard - README + requirements Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BAWVgYJc7xKU8iWuZJgEVk
Repository owner
locked as off-topic and limited conversation to collaborators
Jun 17, 2026
- Lazy-import the Anthropic client so logic can be tested without the package or an API key installed - tests/test_translator.py: fake-client tests for fence stripping, empty-prompt and refusal handling, and the happy path - README: Testing section (offline unittest + real end-to-end check) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BAWVgYJc7xKU8iWuZJgEVk
- offline-tests job: runs the unittest suite on every push/PR (no secrets) - live-check job: gated on an ANTHROPIC_API_KEY secret; generates Terraform via the CLI and validates it with terraform fmt/init/validate, skipped cleanly when the secret is absent - ignore tf-check/ and Terraform state artifacts; document CI in the README Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BAWVgYJc7xKU8iWuZJgEVk
Drop-in replacement for the IaC-AIStudio app.py with auth/security hardening, plus security regression tests, GitLab CI, and a Cloud Shell deploy guide. Changes in app.py: - Pin the /api/generate model server-side (ignore client-supplied model) - OTP: 6-digit crypto codes, HMAC-stored, expiry + attempt lockout, single-use - Require a verified OTP before password reset and account creation - Rotate the session on login and OAuth callback (fixation) - Uniform recovery response (email enumeration); bump SESSION_VERSION 3->4 Internal infra/security docs were intentionally not committed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BAWVgYJc7xKU8iWuZJgEVk
Lets the IaC Build app be managed as a git repo and deployed from the VS Code terminal (az acr build + containerapp update) instead of Cloud Shell. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BAWVgYJc7xKU8iWuZJgEVk
deploy.ps1 mirrors deploy.sh for Windows + VS Code (az acr build + containerapp update); .gitattributes forces LF so Windows edits don't break the Linux container build. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BAWVgYJc7xKU8iWuZJgEVk
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BAWVgYJc7xKU8iWuZJgEVk
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BAWVgYJc7xKU8iWuZJgEVk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A small app that converts plain-English infrastructure descriptions into
Terraform (HCL) for Azure using the azurerm provider, powered by Claude.
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01BAWVgYJc7xKU8iWuZJgEVk